<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/1/17
  Time: 17:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加用户[Bean Validation(JSR 303)]</title>
</head>
<body>
<h1>Bean Validation (JSR303)</h1>
<hr/>
<p>演示提交一个User对象</p>

<form id="user" action="${path}/add" method="post">
  <table width="50%">
    <tr>
      <th>Name:</th>
      <td>
        <input id="name" name="name" type="text" value="${user.name}"/>
      </td>
      <td>
        <span>${errors.name}</span>
      </td>
    </tr>
    <tr>
      <th>Password:</th>
      <td>
        <input id="password" name="password" type="password" value="${user.password}"/>
      </td>
      <td>
        <span>${errors.password}</span>
      </td>
    </tr>
    <tr>
      <th>Age:</th>
      <td>
        <input id="age" name="age" type="text" value="${user.age}"/>
      </td>
      <td>
        <span>${errors.age}</span>
      </td>
    </tr>
    <tr>
      <th>Email:</th>
      <td>
        <input id="email" name="email" type="email" value="${user.email}"/>
      </td>
      <td>
        <span>${errors.email}</span>
      </td>
    </tr>
    <tr>
      <td style="text-align: center">
        <input type="submit" value="提交">
      </td>
    </tr>
  </table>
</form>
</body>
</html>
